package com.wuxiaofan.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wuxiaofan.entity.UndoLog;
import com.wuxiaofan.entity.custom.UndoLogCustom;
import com.wuxiaofan.mapper.UndoLogMapper;
import com.wuxiaofan.util.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;

@Service
public class UndoLogService {
    @Autowired
    private UndoLogMapper undoLogMapper;
    public UndoLog findById(String id){
        return undoLogMapper.selectById(id);
    }

    public UndoLogCustom findCountByMap(Map paraMap){
        return undoLogMapper.findCountByMap(paraMap);
    }

    public UndoLogCustom findGroupByMap(Map paraMap){
        return undoLogMapper.findGroupByMap(paraMap);
    }

    public List<UndoLogCustom> findByMap(Map paraMap){
        return undoLogMapper.findByMap(paraMap);
    }

    public Page<UndoLogCustom> findByMap(Map paraMap, Page page){
        return page.setRecords(undoLogMapper.findByMap(paraMap,page));
    }


    public void updateMapById(Map paraMap){
        undoLogMapper.updateMapById(paraMap);
    }
    public void delById(String id){
        undoLogMapper.deleteById(id);
    }

}
